<? global $lg, $FullUrl; ?>

<div class="form-main">
  <form action="<?=$FullUrl?>/index.php?do=player&act=loginsm" method="post" name="login">
    <label>Account</label>
    <input type="text" name="username" id="username" value="" helper="formText" placeholder="Tài Khoản" maxlength="24"/>
    <br/>
    <label>Mật khẩu</label>
    <input type="password" name="password" id="password" value="" helper="formPassword" placeholder="Mật Khẩu"/>
    <br/>
    <?
        	$_SESSION['captcha'] = mt_rand(10000, 99999);
        ?>
    <div style="display:inline-block; width:350px; float:left;margin-left:200px;margin-bottom:10px;"> <img src="lib/Captcha/PHP-CAPTCHA/php_captcha.php"></div>
    <label>Kiểm tra:</label>
    <input type="text" name="number_captcha" id="code" value="" onfocus="if(this.value=='Mã kiểm tra') this.value=''" onblur="if(this.value=='') this.value='Mã kiểm tra'" value="Mã kiểm tra"/>
    <tr>
      <?=isset($notice)?$notice:'';$notice = ''; ?>
    </tr>
    <br/>
    <div style="display:inline-block;float:left; margin-left:80px; width:400px;"> <a href="<?=$FullUrl?>/index.php?do=player&act=register">
      <div class="reg_button2">&nbsp;</div>
      </a>
      <input value="&nbsp;" name="login" type="submit" class="login_button2" style="margin-left:10px;" onClick="return validateFormLogin()">
    </div>
  </form>
</div>
<script type="text/javascript">
function validateFormLogin()
{
 
	var x=document.forms["login"]["username"].value;
	var y=document.forms["login"]["password"].value;
	var z=document.forms["login"]["code"].value;

	if (x==null || x=='' || y==null || y=='' || z ==null || z =='')
	{  
		alert("Bạn cần điền đầy đủ thông tin");  
		
		return false;
	}
	
	return true;
	
}
</script>